﻿<Window x:Class="Gronia.Test.CameraPanelTest"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:gronia="http://www.gronia.org/wpf/"
        Title="CameraPanel" Height="600" Width="800">
    <DockPanel>
        <Grid DockPanel.Dock="Top" Height="113">
            <StackPanel>
                <Grid Margin="5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="150"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Camera X" VerticalAlignment="Center"/>
                    <Slider Grid.Column="1" Value="{Binding CameraX, ElementName=panel}" Minimum="0" Maximum="400" VerticalAlignment="Center" Margin="5" />
                    <TextBlock Text="Camera Y" Grid.Row="1" VerticalAlignment="Center"/>
                    <Slider Grid.Column="1" Grid.Row="1" Value="{Binding CameraY, ElementName=panel}" Minimum="0" Maximum="300" VerticalAlignment="Center" Margin="5" />
                    <TextBlock Text="Camera Z" Grid.Row="2" VerticalAlignment="Center"/>
                    <Slider Grid.Column="1" Grid.Row="2" Value="{Binding CameraZ, ElementName=panel}" Minimum="0" Maximum="500" VerticalAlignment="Center" Margin="5" />
                    <TextBlock Text="Scale Factor" Grid.Row="0" Grid.Column="4" VerticalAlignment="Center"/>
                    <Slider Grid.Column="5" Grid.Row="0" Value="{Binding ZScaleFactor, ElementName=panel}" Minimum="1" Maximum="400" VerticalAlignment="Center" Margin="5" />
                    <TextBlock Grid.Column="2" Text="X" VerticalAlignment="Center" Margin="20,0,0,0"/>
                    <Slider Grid.Column="3" Value="{Binding (gronia:CameraPanel.X), ElementName=element}" Minimum="0" Maximum="400" VerticalAlignment="Center" Margin="5" />
                    <TextBlock Grid.Column="2" Grid.Row="1" Text="Y" VerticalAlignment="Center" Margin="20,0,0,0"/>
                    <Slider Grid.Column="3" Grid.Row="1" Value="{Binding (gronia:CameraPanel.Y), ElementName=element}" Minimum="0" Maximum="300" VerticalAlignment="Center" Margin="5" />
                    <TextBlock Grid.Column="2" Grid.Row="2" Text="Z" VerticalAlignment="Center" Margin="20,0,0,0"/>
                    <Slider Grid.Column="3" Grid.Row="2" Value="{Binding (gronia:CameraPanel.Z), ElementName=element}" Minimum="0" Maximum="300" VerticalAlignment="Center" Margin="5" />
                </Grid>
            </StackPanel>
        </Grid>
        <gronia:CameraPanel x:Name="panel" CameraZ="100" CameraX="0">
            <Rectangle x:Name="element" gronia:CameraPanel.Z="5" Stroke="Tomato" Width="20" Height="20" StrokeThickness="5" Fill="Pink"/>
            <Rectangle gronia:CameraPanel.X="5" gronia:CameraPanel.Y="5" gronia:CameraPanel.Z="20" Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Green" Width="20" Height="20" StrokeThickness="5" Fill="Lime"/>
            <Rectangle Stroke="Brown" Width="20" Height="20" StrokeThickness="5" Fill="RosyBrown"/>
        </gronia:CameraPanel>
    </DockPanel>
</Window>
